﻿<?xml version="1.0" encoding="utf-8" ?>
<!--
	#if ( !$Root ) #set ( $Root = '.\..\Out\Test' ) #end
	#if ( !$User ) #set ( $User = ${CurrentUser} ) #end
	#if ( !$Project ) #set ( $Project = 'SomeProject' ) #end
  FileSystemRights:
		AppendData ChangePermissions CreateDirectories CreateFiles Delete DeleteSubdirectoriesAndFiles ExecuteFile 
		FullControl ListDirectory Modify Read ReadAndExecute ReadAttributes ReadData ReadExtendedAttributes 
		ReadPermissions Synchronize TakeOwnershop Traverse Write WriteAttributes WriteData WriteExtendedAttributes -->
<Configuration xmlns="http://www.utillity.com/schemas/rave/v1"
               xmlns:ntfs="http://www.utillity.com/schemas/rave/v1/ntfs"
               targetSystem="NtfsFileSystem" rootDirectory="$!Root">
	<Directories>
		<Directory>
			<Name>$Project 1</Name>
			<SecurityEntries>
				<SecurityEntry type="Group" dontAddToAcl="true">
					<MemberID>ProjectGroupG</MemberID>
				</SecurityEntry>
				<SecurityEntry type="Group">
					<MemberID>ProjectGroupDL</MemberID>
					<Rights>ReadAndExecute</Rights>
				</SecurityEntry>
				<!--<SecurityEntry type="User">
          <MemberID>Everyone</MemberID>
          <Rights>Modify, ReadAndExecute, Write, Traverse, Delete</Rights>
        </SecurityEntry>-->
			</SecurityEntries>
		</Directory>
		<Directory removeSecurityEntriesInheritance="true">
			<Name>$Project 2</Name>
			<SecurityEntries>
				<SecurityEntry type="User">
					<MemberID>Everyone</MemberID>
					<Rights>ReadAndExecute</Rights>
				</SecurityEntry>
				<SecurityEntry type="User">
					<MemberID>System</MemberID>
					<Rights>ReadAndExecute</Rights>
				</SecurityEntry>
				<SecurityEntry type="User">
					<MemberID>Manager1</MemberID>
					<Rights>FullControl</Rights>
				</SecurityEntry>
				<SecurityEntry type="User">
					<MemberID>Manager2</MemberID>
					<Rights>FullControl</Rights>
				</SecurityEntry>
			</SecurityEntries>
		</Directory>
	</Directories>
	<Members>
		<Member type="User" id="Everyone">
			<Identifier>S-1-1-0</Identifier>
			<IdentificationType>objectsid</IdentificationType>
		</Member>
		<Member type="User" id="System">
			<Identifier>S-1-5-18</Identifier>
			<IdentificationType>objectsid</IdentificationType>
		</Member>
		<Group id="ProjectGroupDL">
			<Identifier>DL-$Now.Ticks</Identifier>
			<IdentificationType>cn</IdentificationType>
			<AdditionalInformation>
				<MemberAdditionalInformation xmlns="http://www.utillity.com/schemas/rave/v1/ntfs">
					<LdapConnectionString>$LDAP</LdapConnectionString>
					<LdapConnectionUser>$USER</LdapConnectionUser>
					<LdapConnectionPassword>$PWD</LdapConnectionPassword>
				</MemberAdditionalInformation>
			</AdditionalInformation>
			<CreationConfiguration>
				<GroupCreationConfiguration xmlns="http://www.utillity.com/schemas/rave/v1/ntfs" scope="DomainLocal" type="Security">
					<Description>Unit-Test Group - RAVE: $Project</Description>
					<CreationOU>$!BaseDN</CreationOU>
					<Members>
						<!--<ID>Everyone</ID>-->
						<ID>ProjectGroupG</ID>
					</Members>
				</GroupCreationConfiguration>
			</CreationConfiguration>
		</Group>
		<Member type="Group" id="ProjectGroupG">
			<Identifier>G-BUWOG-Temp-$Now.Ticks</Identifier>
			<IdentificationType>cn</IdentificationType>
			<AdditionalInformation>
				<MemberAdditionalInformation xmlns="http://www.utillity.com/schemas/rave/v1/ntfs">
					<LdapConnectionString>$LDAP</LdapConnectionString>
					<LdapConnectionUser>$USER</LdapConnectionUser>
					<LdapConnectionPassword>$PWD</LdapConnectionPassword>
				</MemberAdditionalInformation>
			</AdditionalInformation>
			<CreationConfiguration>
				<GroupCreationConfiguration xmlns="http://www.utillity.com/schemas/rave/v1/ntfs" scope="Global" type="Security">
					<Description>Unit-Test Group - RAVE: $Project</Description>
					<CreationOU>$!BaseDN</CreationOU>
					<Members>
						<ID>Manager1</ID>
						<ID>Manager2</ID>
					</Members>
					<Attributes>
						<Attribute name="managedBy" type="Member">Admins</Attribute>
						<Attribute name="extensionAttribute1">auto-filled by Rave</Attribute>
						<!--
						<Attribute name="dontExist" type="DateTimeUTC">2012-10-05T00:00:00</Attribute>
						<Attribute name="badDate" type="DateTimeUTC">abc</Attribute>
						-->
					</Attributes>
				</GroupCreationConfiguration>
			</CreationConfiguration>
		</Member>
		<Member type="Group" id="Admins">
			<Identifier>Administrators</Identifier>
			<IdentificationType>sAMAccountName</IdentificationType>
		</Member>
		<Member type="User" id="Manager1">
			<Identifier>$User</Identifier>
			<IdentificationType>sAMAccountName</IdentificationType>
		</Member>
		<Member type="User" id="Manager2">
			<Identifier>$User</Identifier>
			<IdentificationType>sAMAccountName</IdentificationType>
		</Member>
	</Members>
</Configuration>